<%@ page language="java" isELIgnored="false" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/include/header.jsp"%>
<title><s:text name="channelPage.titleT"></s:text></title>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/fare/channelTariffs/css/style.css"/>
<link rev="stylesheet" media="all" href="<%=request.getContextPath()%>/fare/css/form_style.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/fare/fang_files/cached_lay_app.css"/>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/channelTariffs/ctjs/jquery.1.7.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/js/ui/jquery-ui-1.8.17.custom.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/FusionCharts/FusionCharts.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/channelTariffs/ctjs/JQ.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/channelTariffs/ctjs/lrtk.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/channelTariffs/ctjs/checkIE.js"></script><!--检测IE-->
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/channelTariffs/ctjs/button.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/js/json2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/jsFile/common.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/js/ui/alertCss-ui.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/fare/js/datePicker/WdatePicker.js"></script>

<!-- 渠道跟收益的滑动js是不同的，我去啊~~~ -->
<link href='<%=request.getContextPath()%>/fare/lib/huadong/css/QuDaohuadong.css'
		rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/lib/huadong/js/QuDaohuadong.js"></script>

<style type="text/css">
.ahover{
	display:block;
	width:64px;
	padding-top:10px;
	background:#535353;
	color:#FFF;
}
.akill {poorfish:expression(this.onclick=function kill(){
			return false;
		}
	)}
</style>
<script type="text/javascript">
$(document).ready(function(){
	$.fn.serializeJson=function(){
		var serializeObj={};
		$(this.serializeArray()).each(function(){
			serializeObj[this.name]=this.value;
		});
		return serializeObj;
	};
	getData();
	//全局变量
	window._HUADONG=huadong("huadong_menu_div");
});

  function sWeekDate(){
	buildTop10($("#ctform").serializeJson());
  }
  
  function showAlldata(){
	  var titleName=document.getElementById("channelPage.titleName").value;
	  var allLines=document.getElementById("channelPage.allLines").value;
	  $("#fcname").val("");
	  $("#tcname").val("");
	  $("#fromCity").val("");
	  $("#toCity").val("");
	  $("#idToaClass").val("");
	  $("#sdTitle").html(titleName+"   "+allLines);
	  if(window._HUADONG){
		  	window._HUADONG.toFirst(false);
		}
	  getData();
  }
  
  function showBydate(obj){
	  var dateA=document.getElementById("channelPage.dateA").value;
	  var afterDateA=document.getElementById("channelPage.afterDateA").value;
	  var date =  obj.substring(0,5);
	  var now = new Date();//30天第一天
 	    //去掉时分秒只比较到天
 	    var nowDateStr = now.getFullYear()+"-"+now.getMonth()+"-"+now.getDate();
 	    nowDateStr = nowDateStr.split('-');
 	    var newDateTonow = new Date(nowDateStr[0],nowDateStr[1],nowDateStr[2]);
 	    var newDate = new Date();//最后一天
 	    var chioceDate="";
 	    var arys;
 	   chioceDate = now.getFullYear()+"-"+date.replace("/","-");
	    	arys = chioceDate.split('-');     
	    	newDate = new Date(arys[0], arys[1]-1, arys[2]);
		if(newDate.getTime() < newDateTonow.getTime()){
			alert(dateA+now.getFullYear()+"-"+Number(now.getMonth()+1)+"-"+now.getDate()+afterDateA);
			return false;
		}
		var edate = DateAdd('d ',29,new Date());
		var endDateStr = edate.getFullYear()+"-"+edate.getMonth()+"-"+edate.getDate();
		endDateStr = endDateStr.split('-');
		var endDate = new Date(endDateStr[0],endDateStr[1],endDateStr[2]);
		if(newDate.getTime() > endDate.getTime()){
			alert(dateA+now.getFullYear()+"-"+Number(now.getMonth()+1)+"-"+now.getDate()+afterDateA);
			return false;
		}
      $("#hdate").val(date);
  	  $("#sope_Time").val(chioceDate); 
  	 buildTop10($("#ctform").serializeJson());
  }
  
   function  DateAdd(interval,number,date)  
  {  
   /* 
   *   功能:实现VBScript的DateAdd功能. 
   *   参数:interval,字符串表达式，表示要添加的时间间隔. 
   *   参数:number,数值表达式，表示要添加的时间间隔的个数. 
   *   参数:date,时间对象. 
   *   返回:新的时间对象. 
   *   var   now   =   new   Date(); 
   *   var   newDate   =   DateAdd( "d ",5,now); 
   *---------------   DateAdd(interval,number,date)   ----------------- 
   */  
          switch(interval)  
          {  
                   case   "y "   :   {  
                          date.setFullYear(date.getFullYear()+number);  
                          return   date;  
                           break;  
                   }  
                   case   "q "   :   {  
                           date.setMonth(date.getMonth()+number*3);  
                           return   date;  
                           break;  
                   }  
                  case   "m "   :   {  
                          date.setMonth(date.getMonth()+number);  
                          return   date;  
                          break;  
                   }  
                   case   "w "   :   {  
                           date.setDate(date.getDate()+number*7);  
                           return   date;  
                           break;  
                  }  
                   case   "d "   :   {  
                           date.setDate(date.getDate()+number*1);
                           return   date;  
                           break;  
                   }  
                   case   "h "   :   {  
                           date.setHours(date.getHours()+number);  
                           return   date;  
                           break;  
                  }  
                   case   "mi "   :   {  
                           date.setMinutes(date.getMinutes()+number);  
                           return   date;  
                           break;  
                   }  
                   case   "s "   :   {  
                           date.setSeconds(date.getSeconds()+number);  
                           return   date;  
                           break;  
                  }  
                   default   :   {  
                           date.setDate(d.getDate()+number);  
                           return   date;  
                           break;  
                   }  
          }  
 }

  function loadDataByHx(codeName){
	  var titleName=document.getElementById("channelPage.titleName").value;
	  	var fromCode = codeName.name.substring(0,3);
	  	var toCode   = codeName.name.substring(3,6);
	  	var isCity=codeName.name.substring(6,7);
	  	var aid = codeName.id;
	  	$("#idToaClass").val(aid);
		var params = $("#ctform").serializeJson();
		params.fromCityStr = fromCode;
		params.toCityStr = toCode;
		params.isCity=isCity;
		$("#sdTitle").html(titleName+$(codeName).html());
	  	getData(params);
	  	window._HUADONG.to(codeName._index,false);
  }
  </script>
  </head>
<body>
<%@ include file="/include/home/home_header.jsp" %>
	<jsp:include page="/pages/system/feedback/feedback.jsp"></jsp:include>
<form action="" id="ctform" name="ctform" method="post">
<!-- internationalization  -->
<input type="hidden" id="channelPage.titleName" value="<s:text name ="channelPage.titleName"/>"/>
<input type="hidden" id="channelPage.allLines" value="<s:text name ="channelPage.allLines"/>"/>
<input type="hidden" id="channelPage.dateA" value="<s:text name ="channelPage.dateA"/>"/>
<input type="hidden" id="channelPage.afterDateA" value="<s:text name ="channelPage.afterDateA"/>"/>

<input type="hidden" id="hdate" name="hdate"/>
<input type="hidden" id="hsope_Time" name="hsope_Time" value="${sope_Time}"/>
<input type="hidden" id="isnull" name="isnull" value="${isnull}"/>
<input type="hidden" id="fcname" name="fcname" value="${fromCity}"/>
<input type="hidden" id="tcname" name="tcname" value="${toCity}"/>
<input type="hidden" id="isCity" name="isCity" value="${toCity}"/>
<input type="hidden" id="isdefault" name="isdefault" value="${isdefault}"/>
<input type="hidden" id="idToaClass" name="idToaClass" value="${idToaClass}"/>
<div class="main_max">
 <div class="high_10"></div>
 <!-- 隐藏这个，用下面那个 -->
 <!-- *********************************************************************************************************** -->
<div class="nav_bg" style="display:none">
<div class="nav">
    <ul id="prul">
        <li id="fristli" class="cur" ><a id="titaid" href="javaScript:void(0)" 
        class="normaltab" onclick="showAlldata()"><s:text name="channelPage.allLines"/></a></li>
        <c:forEach var="o" items="${citylist}" varStatus="stat" end="2">
        <li style={width:150PX} id="prli${stat.index+1}"><a id="lia${stat.index+1}" 
        name="${o.departcitycode}${o.arrivalcitycode}${o.iscity}" 
        href="javaScript:void(0)" onclick="loadDataByHx(this)">${o.departcity}-${o.arrivalcity}</a> 
       <%--  <a href="javaScript:void(0)" id="${o.id}" onclick="delPopularRoutes('${o.id}')">
        <img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/close.gif" border="0" /></a> --%>
        </li>
    	</c:forEach>
    </ul> 
    <div class="curBg"></div>
    <div class="cls"></div>
</div>
</div>

<!-- start ***************************************************************************************************************** -->

<div id="huadong_menu_div" class="HUADONG">

 	<ul>
        <li id="fristli" ><a id="titaid" href="javaScript:void(0)" class="item_query" onclick="showAlldata()" ><s:text name="channelPage.allLines"/></a></li>
        <c:forEach var="o" items="${citylist}" varStatus="stat">
        <li id="prli${stat.index+1}" >
        <a style="width:150PX" id="lia${stat.index+1}" name="${o.departcitycode}${o.arrivalcitycode}${o.iscity}" class="item_query"
        	href="javaScript:void(0)" onclick="loadDataByHx(this)">${o.departcity}-${o.arrivalcity}
       </a>
        </li>
   		</c:forEach>
    </ul> 
</div>
<!-- end  ***************************************************************************************************************** -->

 <div class="high_10"></div>
 <div class="right_max" id="right_max">
 <div class="rank_top"></div>
 <div class="rank">
 <div class="gary">
 <!-- 淘宝 -->
 <ul>
 <li><img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/title_01.png" ></li>
 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.3per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
  <tr class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr> 
  <tr style="text-align:right">
    <td id="Tfuture303">${nextmap3.tq0000103}<s:text name="channelPage.number"/></td>        <!-- 超过3%  +3 -->
    <td id="Tfuture307">${nextmap7.tq0000103}<s:text name="channelPage.number"/></td>  <!-- 超过3%  +7 -->
    <td id="Tfuture315">${nextmap15.tq0000103}<s:text name="channelPage.number"/></td>                <!-- 超过3%  +15 -->
  </tr>
</table>
 </ul>
 </div>
 
 <div class="white">
 <ul>

 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.6per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
 <tr  class="tr_center" style="text-align:right;font-weight:bolder;">
    <td >+3</td>
    <td >+7</td>
    <td >+15</td>
  </tr> 
  <tr style="text-align:right">
    <td id="Tfuture603">${nextmap3.tq0000106}<s:text name="channelPage.number"/></td>      <!-- 超过6%  +3 -->
    <td id="Tfuture607">${nextmap7.tq0000106}<s:text name="channelPage.number"/></td>   <!-- 超过6%  +7 -->
    <td id="Tfuture615">${nextmap15.tq0000106}<s:text name="channelPage.number"/></td>		<!-- 超过6%  +15 -->		
  </tr>
</table>
 </ul>
 </div>
 </div>
 <div class="rank_bot"></div>
 <div class="high_10"></div>
 <div class="rank_top"></div>
 <div class="rank">
 <div class="gary">
 <!-- 去哪儿-->
 <ul >
 <li><img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/title_02.png" ></li>
 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.3per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list" >
  <tr  class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr> 
  <tr style="text-align:right">
    <td  id="Qfuture303">${nextmap3.tq0000203}<s:text name="channelPage.number"/></td>      <!-- 超过3%  +3 -->
    <td id="Qfuture307">${nextmap7.tq0000203}<s:text name="channelPage.number"/></td>   <!-- 超过3%  +7 -->
    <td id="Qfuture315">${nextmap15.tq0000203}<s:text name="channelPage.number"/></td>		<!-- 超过3%  +15 -->		
  </tr>
</table>
 </ul>
 </div>
 
 <div class="white">
 <ul>

 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.6per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
  <tr class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr>
  <tr style="text-align:right">
    <td id="Qfuture603">${nextmap3.tq0000206}<s:text name="channelPage.number"/></td>  <!-- 超过6%  +3 -->
    <td id="Qfuture607">${nextmap7.tq0000206}<s:text name="channelPage.number"/></td> <!-- 超过6%  +7 -->
    <td id="Qfuture615">${nextmap15.tq0000206}<s:text name="channelPage.number"/></td> <!-- 超过6%  +15 -->
  </tr>
</table>
 </ul>
 </div>
 </div>
 
  <div class="rank_bot"></div>
 <div class="high_10"></div>
 <div class="rank_top"></div>
 <div class="rank">
 <div class="gary">
 <!-- 携程-->
 <ul>
 <li><img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/title_03.png" ></li>
 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.3per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
  <tr class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr> 
  <tr style="text-align:right">
    <td id="Xfuture303">${nextmap3.tq0000303}<s:text name="channelPage.number"/></td>      <!-- 超过3%  +3 -->
    <td id="Xfuture307">${nextmap7.tq0000303}<s:text name="channelPage.number"/></td>   <!-- 超过3%  +7 -->
    <td id="Xfuture315">${nextmap15.tq0000303}<s:text name="channelPage.number"/></td>		<!-- 超过3%  +15 -->		
  </tr>
</table>
 </ul>
 </div>
 
 <div class="white">
 <ul>

 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.6per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
  <tr class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr>
  <tr style="text-align:right">
    <td id="Xfuture603">${nextmap3.tq0000306}<s:text name="channelPage.number"/></td>  <!-- 超过6%  +3 -->
    <td id="Xfuture607">${nextmap7.tq0000306}<s:text name="channelPage.number"/></td> <!-- 超过6%  +7 -->
    <td id="Xfuture615">${nextmap15.tq0000306}<s:text name="channelPage.number"/></td> <!-- 超过6%  +15 -->
  </tr>
</table>
 </ul>
 </div>
 </div>
 
  <div class="rank_bot"></div>
 <div class="high_10"></div>
 <div class="rank_top"></div>
 <div class="rank">
 <div class="gary">
 <!-- 艺龙 -->
 <ul>
 <li><img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/title_04.png" ></li>
 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.3per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
  <tr class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr> 
  <tr class="showNumbers2" style="text-align:right">
    <td id="Yfuture303">${nextmap3.tq0000403}<s:text name="channelPage.number"/></td>      <!-- 超过3%  +3 -->
    <td id="Yfuture307">${nextmap7.tq0000403}<s:text name="channelPage.number"/></td>   <!-- 超过3%  +7 -->
    <td id="Yfuture315">${nextmap15.tq0000403}<s:text name="channelPage.number"/></td>		<!-- 超过3%  +15 -->		
  </tr>
</table>
 </ul>
 </div>
 
 <div class="white">
 <ul>

 <li><img src="<%=request.getContextPath()%>/<s:text name ="channelPage.6per" />"  /></li>
 <table width="0" border="0" cellspacing="0" cellpadding="0" class="rank_list">
  <tr class="tr_center" style="text-align:right;font-weight:bolder;" >
    <td>+3</td>
    <td>+7</td>
    <td>+15</td>
  </tr>
  <tr style="text-align:right">
    <td id="Yfuture603">${nextmap3.tq0000406}<s:text name="channelPage.number"/></td>  <!-- 超过6%  +3 -->
    <td id="Yfuture607">${nextmap7.tq0000406}<s:text name="channelPage.number"/></td> <!-- 超过6%  +7 -->
    <td id="Yfuture615">${nextmap15.tq0000406}<s:text name="channelPage.number"/></td> <!-- 超过6%  +15 -->
  </tr>
</table>
 </ul>
 </div>
 </div>
 
 <div class="rank_bot"></div>
 </div>
 <div class="left_max" id="char_bg">
 
 <div class="char_bg" >
 <%-- <input id="text" type="hidden" value="<s:property value="xml"/>"/>--%>
 
<!--  <div id="chartContainer" style="width: 100%;moverflow-x:scroll;height: 300px;"> -->
<script type="text/javascript">
 function loadSwf(xml){
		//var xml = document.getElementById('text').value;
		var chart2 = new FusionCharts("<%=request.getContextPath()%>/FusionCharts/MSBar3D.swf", "chartId2","600","650");
		chart2.setDataXML(xml);
		chart2.render("chartContainer");
 };
 
 </script> 
 <ul>
 <li class="title" style="padding-left: 150px;padding-top: 10px;" id="sdTitle"><s:text name="channelPage.titleName"/><s:text name="channelPage.allLines"/></li>
 <li class="char">
 <div id="chartContainer" style="width: 100%;moverflow-x:scroll;height: 650px; padding-left: 15px">
	 	
 </div>
<%--  <img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/pic.png"/> --%>
 </li>
 </ul>
 </div>
 <div class="char_detialDiv" id="char_detialDiv">
 <c:forEach var="ltf" items="${listTobFive}" varStatus="stat">
 <ul>
 <li class="names" title="${ltf.channelName}&nbsp;${ltf.owName}">${ltf.channelName}&nbsp;${ltf.owName}</li>
 <li class="pers">${ltf.spreadsThan}%</li>
 </ul>
 </c:forEach> 

 </div>
 
 </div>
<div class="width_800"></div>
<div id="form_list" class="left_max" >
<div class="left_max">
<div class="time_title"><s:text name="channelPage.date"/>
<img style="cursor: pointer;"onclick="WdatePicker({onpicked:sWeekDate,el:'sope_Time',skin:'whyGreen',lang:'<s:text name='forms.locale'/>',doubleCalendar:false,dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d',maxDate:'${maxDate}'});"src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/calendar.png" border="0">
</div>
<input type="hidden" id="sope_Time" name="sope_Time" class="Wdate"/>
   <div class="time_max2">
    <ul class="sfbz_btbox2" id="sfbz_btbox2">
      <%-- <li><span class="over">12-2 周一</span></li> 
       <li><a href="#" class="ssbt1">12-2 周二</a></li>--%>
       <%--<c:forEach var="ls" items="${list_str}" varStatus="stat">
       <li style="line-height: 96px;"><a id="timetd${stat.index+1}" href="javaScript:void(0)" class="ssbt1 flightTime" onclick="showBydate('${ls}')">${ls}</a></li>
      </c:forEach>--%>
    </ul> 
    </div>
</div>
<!-- <div class="width_800"></div> -->
<div class="left_max" >
<font style="margin-right: 605px;font-family: 微软雅黑;">【<s:text name="channelPage.weekDiffPrice"/> TOP3】</font>

<table width="0" border="0" cellspacing="0" cellpadding="0" class="form_list"  style="text-align:center;"> 
  <tr class="title" style="text-align:center;">
  	<td style="text-align:center;"><s:text name="share.indexNo"/></td>
  	<td style="text-align:center;"><s:text name="channelPage.website"/></td>
    <td style="text-align:center;"><s:text name="share.agent"/></td>
    <td style="text-align:center;"><s:text name="share.grabDate"/></td>
    <td style="text-align:center;"><s:text name="share.flightDate"/></td>
    <td style="text-align:center;"><s:text name="share.flighNumber"/></td>
    <td style="text-align:center;"><s:text name="channelPage.spreadsT"/></td>
    </tr>
  <tbody >
  	<tr class="one" onMouseOver="this.className='org'" onMouseOut="this.className='one'" style="text-align:center;">
	    <td width="25">
	      <img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/one.gif" ></td>
	    <td id="form_list_grabChannel1" style="text-align:center;"></td>
	    <td id="form_list_qdName1" style="text-align:center;"></td>
	    <td id="form_list_grabDate1" style="text-align:center;"></td>
	    <td id="form_list_sdate1" style="text-align:center;"></td>
	    <td id="form_list_hb1" style="text-align:center;"></td>
	    <td id="form_list_jcb1" style="text-align:center;"></td>
  </tr>
	  <tr class="" onMouseOver="this.className='org'" onMouseOut="this.className=''" style="text-align:center;">
	    <td><img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/two.gif" alt="" ></td>
	    <td id="form_list_grabChannel2" style="text-align:center;"></td>
	    <td id="form_list_qdName2" style="text-align:center;"></td>
	    <td id="form_list_grabDate2" style="text-align:center;"></td>
	    <td id="form_list_sdate2" style="text-align:center;"></td>
	    <td id="form_list_hb2" style="text-align:center;"></td>
	    <td id="form_list_jcb2" style="text-align:center;"></td>
  </tr>
  <tr class="one" onMouseOver="this.className='org'" onMouseOut="this.className='one'" style="text-align:center;">
	    <td><img src="<%=request.getContextPath()%>/fare/channelTariffs/ctimages/three.gif" alt="" ></td>
	    <td id="form_list_grabChannel3" style="text-align:center;"></td>
	    <td id="form_list_qdName3" style="text-align:center;"></td>
	    <td id="form_list_grabDate3" style="text-align:center;"></td>
	    <td id="form_list_sdate3" style="text-align:center;"></td>
	    <td id="form_list_hb3" style="text-align:center;"></td>
	    <td id="form_list_jcb3" style="text-align:center;"></td>
  </tr>
  </tbody>
 </table>

 </div>
 </div>
 </div>
<script type='text/javascript' src='<%=request.getContextPath()%>/fare/js/cityquery/querycity.js'></script>
<script type='text/javascript' src='<%=request.getContextPath()%>/fare/js/cityquery/citylist.js'></script>
 
 <script type="text/javascript">
 	$(function (){
 		 $slider = $(".curBg");
		  $navBox = $(".nav");
 		var idToaClass = $("#idToaClass").val();
 		var lid = idToaClass.substring(3,idToaClass.length);
 		var $liCur;
 		var curP;
 		var curW;
 		var $slider;
 		 $targetEle = $(".nav ul li a");
 		if(lid!=""){
 			if(lid=="i0"){
 				$("#fristli").addClass("cur");
 			}else{
 				$("#fristli").removeClass("cur");
 	 	 		$("#prli"+lid).addClass("cur");
 	 	 		$liCur = $("#prli"+lid);
 	  	 		curP = $liCur.position().left;
 	  	 		curW = $liCur.outerWidth(true); 
 	 	 		$slider = $(".curBg");
 	 	 		 $slider.animate({
 					  "left":curP,
 					  "width":curW
 				}); 
 			}
 		}
 		$targetEle.mouseenter(function () {
			  var $_parent = $(this).parent(),
				_width = $_parent.outerWidth(true),
				posL = $_parent.position().left;
			  
			  $slider.stop(true, false).animate({
				"left":posL,
				"width":_width}, "fast");
			});
			
			$navBox.mouseleave(function (cur, wid) {
				var $liCur = $(".nav ul li.cur");
				curP = $liCur.position().left;
				curW = $liCur.outerWidth(true);
			  cur = curP;
			  wid = curW;
			  $slider.stop(true, false).animate({
				"left":cur,
				"width":wid
			  }, "fast");
			});
 	});

	  function createLoading(obj){
		  var width = obj.width();
		  var height = obj[0].offsetHeight;
		  	 var _waitImg=document.createElement("DIV");
			 var _wait_waitDiv = document.createElement("DIV");
			 _waitImg.id = "_waitImg";
			 _wait_waitDiv.id="_wait_waitDiv";
			  $(_waitImg).css({
			  	width:'32px',
			  	height:'32px',
			  	position:'absolute',
			  	'z-index':10001,
			  	display:'none',
			  	'background-image':'url(<%=request.getContextPath()%>/fare/channelTariffs/images/blue-loading.gif)'
			  });
			  $(_wait_waitDiv).css({
			  	position:'absolute',
			  	width:width+'px',
			  	height:height+'px',
			  	top:'0px',
			  	left:'0px',
				'z-index':10000,
				'-ms-filter':"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)", /* ie8  */
			    filter:"alpha(opacity=50)",    /* ie5-7  */
			    '-moz-opacity':0.5,    /* old mozilla browser like netscape  */
			    '-khtml-opacity': 0.5,    /* for really really old safari */ 
			    opacity: 0.5,  
			    display:'none',
				background:'#ECECEC'
			  });
			  var left = (width-$(_waitImg).width())/2;
			  var top = (height-$(_waitImg).height())/2;
			  $(_waitImg).css({
			  	"left":left+'px',
			  	"top":top+'px'
			  });
			  obj.append(_wait_waitDiv);
			  obj.append(_waitImg);
	  }
	  createLoading($("#form_list"));
	  createLoading($("#right_max"));
	  createLoading($("#char_bg"));
	  
 /***
   * 第一个柱图报表，排名前10的价差比
   **/
 function buildTop10(params){
	  $("#char_bg #_waitImg").css("display","block");
	  $("#char_bg #_wait_waitDiv").css("display","block");
	  $.ajax({
		    url :'channelTariffsAction!loadSwfData.action?a='+Math.random(),
		    cache : false,
		    async : true,
		    data : params,
		    type : 'POST',
		    dataType : 'json',
		    success : function(result){
	    		loadSwf(result.xml);
	    		$("#isnull").val(trim(result.isnull));
	    		$("#hsope_Time").val(trim(result.sope_Time));
	    		$("#fcname").val(trim(result.fromCity));
		    	$("#tcname").val(trim(result.toCity));
		    	$("#isCity").val(trim(result.isCity));
		    	$("#isdefault").val(trim(result.isdefault));
		    	$("#idToaClass").val(trim(result.idToaClass));
		    	
		    	var html = "";
		    	var listTobFive = result.listTobFive;
		    	if(listTobFive != null){
		    		for(var i=0;i<listTobFive.length;i++){
		    			var tmp = listTobFive[i];
		    			html += "<ul><li class='names' title='"+tmp.channelName+"&nbsp;"+tmp.owName+"'>"+tmp.channelName+"&nbsp;"+tmp.owName+
		    			"</li><li class='pers'>"+tmp.spreadsThan+"%</li></ul>";
		    			tmp = null;
		    		}
		    	}
		    	$("#char_detialDiv").html(html);
		    	var list_str = result.list_str;
		    	if(list_str != null){
		    		var html = "";
		    		for(var i=0;i<list_str.length;i++){
		    			html += '<li style="line-height: 96px; "><a id="timetd'+(i+1)
		    			+'" href="javaScript:void(0)" class="ssbt1 flightTime" onclick="showBydate(\''+list_str[i]+'\')">'+list_str[i]+'</a></li>';
		    		}
		    		$("#sfbz_btbox2").html(html);
		    		$("#timetd4").addClass("over").addClass("flightTime"); 
		    	}
		    	$("#char_bg #_waitImg").css("display","none");
	  			$("#char_bg #_wait_waitDiv").css("display","none");
		    }
	  }); 
 }
 /***
  * 第二个列表报表，一周内的前3名价差比
  **/
 function buildWeekTop3(params){
	  $("#form_list #_waitImg").css("display","block");
	  $("#form_list #_wait_waitDiv").css("display","block");
		$.ajax({
		    url :'channelTariffsAction!WeekSpreadTop3.action'+'?a='+Math.random(),
		    cache : false, 
		    async : true,
		    data : params,
		    type : 'POST',
		    dataType : 'json',
		    success : function(result){
		    	var cpls = result.cpls;
		    	if(cpls != null){
		    		for(var i=0;i<cpls.length;i++){
		    			var tmp = cpls[i];
		    		    $("#form_list_grabChannel"+(i+1)).text(tmp.grabChannel);
		    		    $("#form_list_qdName"+(i+1)).text(tmp.qdName);
		    		    $("#form_list_grabDate"+(i+1)).text(tmp.grabDate);
		    		    $("#form_list_sdate"+(i+1)).text(tmp.sdate);
		    		    $("#form_list_hb"+(i+1)).text(tmp.hb);
		    		    $("#form_list_jcb"+(i+1)).text(tmp.jcb);
		    		}
		    	}
		    	$("#form_list #_waitImg").css("display","none");
	 			$("#form_list #_wait_waitDiv").css("display","none")
		    }
	  });
 }
 /***
  * 第三个报表，超官网数量
  **/
 function buildOverNum(params){
	 $("#right_max #_waitImg").css("display","block");
	  $("#right_max #_wait_waitDiv").css("display","block");
		$.ajax({
		    url :'channelTariffsAction!futureThreeDaysSpread.action'+'?a='+Math.random(),
		    cache : false, 
		    async : true,
		    data : params,
		    type : 'POST',
		    dataType : 'json',
		    success : function(result){
		    	var nowDatemap = result.nowDatemap;
		    	var nextmap3 = result.nextmap3;
		    	var nextmap7 = result.nextmap7;
		    	var nextmap15 = result.nextmap15;
		    	/*
				 * HBASE_KEY  
				 * 00001 淘宝
				 * 00002 去那儿
				 * 00003 携程
				 * 00004 艺龙
				 * */
				 //淘宝统计
		    	$("#Tfuture303").text(nextmap3.tq0000103);   /*淘宝未来3天超3%*/
		    	$("#Tfuture307").text(nextmap7.tq0000103);   /*淘宝未来7天超3%*/
		    	$("#Tfuture315").text(nextmap15.tq0000103);	/*淘宝未来15天超3%*/			    	
		    	$("#Tfuture603").text(nextmap3.tq0000106);   /*淘宝未来3天超6%*/
		    	$("#Tfuture607").text(nextmap7.tq0000106);   /*淘宝未来7天超6%*/
		    	$("#Tfuture615").text(nextmap15.tq0000106);	/*淘宝未来15天超6%*/
		    	//去那儿统计
		    	$("#Qfuture303").text(nextmap3.tq0000203);	/*去那儿网未来3天超3%*/
		    	$("#Qfuture307").text(nextmap7.tq0000203);	/*去那儿网未来7天超6%*/
		    	$("#Qfuture315").text(nextmap15.tq0000203);	/*淘宝未来15天超3%*/
		    	$("#Qfuture603").text(nextmap3.tq0000206);  /*淘宝未来3天超6%*/
		    	$("#Qfuture607").text(nextmap7.tq0000206);   /*去那儿网未来7天超3%*/
		    	$("#Qfuture615").text(nextmap15.tq0000206);	  /*去那儿网未来15天超6%*/
		    	//携程统计
		    	$("#Xfuture303").text(nextmap3.tq0000303);	/*携程网未来3天超3%*/
		    	$("#Xfuture307").text(nextmap7.tq0000303);	/*携程网未来7天超6%*/
		    	$("#Xfuture315").text(nextmap15.tq0000303);	/*携程网15天超3%*/
		    	$("#Xfuture603").text(nextmap3.tq0000306);  /*携程网来3天超6%*/
		    	$("#Xfuture607").text(nextmap7.tq0000306);   /*去那儿网未来7天超3%*/
		    	$("#Xfuture615").text(nextmap15.tq0000306);	  /*携程网未来15天超6%*/
		    	//艺龙统计
		    	$("#Yfuture303").text(nextmap3.tq0000403);	/*艺龙网未来3天超3%*/
		    	$("#Yfuture307").text(nextmap7.tq0000403);	/*艺龙网未来7天超6%*/
		    	$("#Yfuture315").text(nextmap15.tq0000403);	/*艺龙未来15天超3%*/
		    	$("#Yfuture603").text(nextmap3.tq0000406);  /*艺龙未来3天超6%*/
		    	$("#Yfuture607").text(nextmap7.tq0000406);   /*艺龙网未来7天超3%*/
		    	$("#Yfuture615").text(nextmap15.tq0000406);	  /*艺龙网未来15天超6%*/
		    	
				  $("#right_max #_waitImg").css("display","none");
				  $("#right_max #_wait_waitDiv").css("display","none");
		    }
	  });
 }
 /**
   * 切换航线时查询所有的报表数据
   **/
 function getData(params){
	if(params == null){
		params = {};
	}
	buildTop10(params);  
	buildWeekTop3(params);  
	buildOverNum(params);  
 };
		function trim(obj){
			return obj==null?"":obj;
		};
		$("#prul li").click(function(){
			$("#prul li").each(function(){
				$(this).removeClass("cur");
			});
			$(this).addClass("cur");
		});
		$(".flightTime").live('click',function(){
			$(".flightTime").each(function(){
				$(this).removeClass("over");
			});
			$(this).addClass("over");
		});
 </script>
</form>
<script type="text/javascript" src="<%=request.getContextPath()%>/fare/channelTariffs/ctjs/nav.js"></script>
<%@ include file="/include/home/home_footer.jsp" %> 
</body>
</html>
